package development.bean;

import state.media.AudioManager;
import state.media.Player;
import state.media.VolumeControl;

public class DaoVangVariables {
  public int level = 0;
  public int maxObject = 20;
  public int maxLevel;
  public int score = 0;
  public boolean f1 = false;
  public boolean f2 = false;
  public int f3 = 0;
  public boolean f4 = false;
  public boolean f5 = false;
  public int volume = 50; // 0 ~ 100;
  public Player player;
  public int i = 0;

  public void play(String fileName) {
    if (player != null) {
      player.stop();
      player = null;
    }

    player = AudioManager.createPlayer(fileName, "audio/midi");
    player.prefetch();
    player.getControl("VolumeControl").setLevel(volume);
    player.start();
  }
}